package cn.yunhe.util;


import java.io.*;
import java.util.List;

public class ReadExcel {

    public static List<List<String>> readExcel(File file) throws IOException {
        InputStream inputStream = null;
        List<List<String>> lists = null;
        try {

            inputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            e.printStackTrace ();
        }
        ImportExcelUtil importExcelUtil = new ImportExcelUtil();

        try {
            lists = importExcelUtil.getBankListByExcel(inputStream, ".xlsx");
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            inputStream.close();
            file.delete();
        }
        return lists;
    }
}
